<template>
	<view class="custom_vertical_list_default_news">
		<navigator :url="'pages/news-view?contentId=' + item.content.contentId">
			<view class="custom_vertical_list_default_news_content" :class="item.content.aside.isTop ? 'istop' : ''">{{ item.content.text }}</view>
		</navigator>
		<view class="custom_vertical_list_default_news_aside">
			<view class="custom_vertical_list_default_news_aside_top" v-if="item.content.aside.isTop">置顶</view>
			<view class="custom_vertical_list_default_news_aside_left">
				<navigator :url="'pages/group-view?id=' + item.group.groupId">{{ item.group.title }}</navigator>
			</view>
			<view class="custom_vertical_list_default_news_aside_right">
				<navigator :url="'pages/comment-view?contentId=' + item.content.contentId + '&commentId=' + item.content.aside.comment.commentId">
					评论{{ fixNumber(item.content.aside.comment.commentCount) }}
				</navigator>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'custom-vertical-list-default-news',
	props: {
		item: {
			type: Object,
			default() {
				return {};
			}
		},
		isBrowser: {
			type: Boolean,
			default() {
				return false;
			}
		}
	},
	data() {
		return {};
	},
	methods: {
		fixNumber(t) {
			return this.$plugins.fixNumber(t, 100);
		}
	}
};
</script>

<style lang="less">
.custom_vertical_list_default_news {
	text-align: left;
	border-bottom: 2rpx solid #efefef;
	padding: 20rpx 0;
	.custom_vertical_list_default_news_content {
		font-size: 26rpx;
		padding: 10rpx 0;
		&.istop {
			font-weight: 700;
		}
	}
	.custom_vertical_list_default_news_aside {
		font-size: 20rpx;
		display: flex;
		color: #999999;
		.custom_vertical_list_default_news_aside_top {
			color: red;
			margin: 0 10rpx 0 0;
		}
		.custom_vertical_list_default_news_aside_left {
		}
		.custom_vertical_list_default_news_aside_right {
			margin: 0 0 0 10rpx;
		}
	}
}
</style>
